<?php
include("functions.php");

header('Content-Type: text/javascript');
header('Cache-Control: no-cache');
header('Pragma: no-cache');

if (!$link = connect()){
	die ("Error en la conexión con la base de datos");
}

//Insert data into database
$sql = "SELECT COUNT(*) FROM gb_entries;";
$resul = mysql_db_query('guestbook', $sql, $link);

$row = mysql_fetch_row($resul);
echo $row[0];

disconnect($link);

?>